/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ac.za.cput.kleintjes.question4.adp.violates.testing;

import ac.za.cput.kleintjes.question4.adp.violates.conf.OwnerConfig;
import ac.za.cput.kleintjes.question4.adp.violates.model.owner.Owner;
import ac.za.cput.kleintjes.question4.adp.violates.services.IOwner;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 *
 * @author Hughan.Kleintjes.hughanK@gmail.com
 */
public class IOwnerJUnitTestv {
    private static ApplicationContext ctx;
    private static IOwner ownerUtility;
    
    public IOwnerJUnitTestv() {
    }

    @BeforeClass
    public static void setUpClass() throws Exception {
        ctx = new AnnotationConfigApplicationContext(OwnerConfig.class);
        ownerUtility = (IOwner)ctx.getBean("owner");
    }

    @AfterClass
    public static void tearDownClass() throws Exception {
    }

    /**
     * Test of printOwner method, of class IOwner.
     */
    @Test
    public void testPrintOwner() {
        System.out.println("printOwner");
        Owner john = new Owner();
        john.setOwnerName("John Miller");
        john.setOwnerID("90045");
        john.setAccountNumber("210065987");
        ownerUtility.printOwner(john);
    }
    
}
